package com.customer.controller.admin;

import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 2 * @Author: xy
 * 3 * @Date: 2021/10/28 上午 11:23:47
 */
@Component
public class cronjobscontroller {

    private static final SimpleDateFormat dataFormat = new SimpleDateFormat("HH:mm:ss");

    //每隔三秒执行一次任务
//    @Scheduled(fixedRate = 3000)
    public void cronJobs() {
        System.out.println("时间为：" + dataFormat.format(new Date()));
    }

}